var ajax = function(a,url,b){

    var xhr = new XMLHttpRequest();
    xhr.open(a,url,true);
    xhr.send();

    xhr.onreadystatechange = function(){
        if(xhr.readyState==4 && xhr.status==200){
            b(JSON.parse(xhr.responseText));
        }
    }
}
